package com.qin.logback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author Leisure
 * create 2022 2022/9/29 9:04
 **/

@SpringBootApplication
@Slf4j
public class Start {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Start.class, args);
        int length = context.getBeanDefinitionNames().length;
        log.trace("Spring Boot 启动初始化了{}个Bean",length);
        log.debug("Spring Boot 启动初始化了{}个Bean",length);
        log.info("Spring boot启动初始化了 {} 个 Bean", length);
        log.warn("Spring boot启动初始化了 {} 个 Bean", length);
        log.error("Spring boot启动初始化了 {} 个 Bean", length);
        try {
            int i = 0;
            int j = 1/i;
        } catch (Exception e) {
            log.error("【SpringBootDemoLogbackApplication】启动异常：",e);
        }

    }
    
    
}
